<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/5/4
 * Time: 17:45
 */

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Spatie\Permission\Models\Role;

class ModelsRoles extends Model
{

    /**
     * 与模型关联的数据表
     *
     * @var string
     */
    protected $table = 'model_has_roles';

    /**
     * 某个角色
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function role(){
        return $this->belongsTo(Role::class);
    }
}